<?php $this->deleteByCheckbox('.deleteProfessor',$this->baseUrl() . '/professor/delete','.message');?>
<div class="adminPanel">	
	<div class="toolboxImg icon-professor">Správa profesorov</div>	
	<div class="toolbox">		
		<table class="toolbox">
		<tr>
			<td>				
				<a href="<?= $this->url(array('controller' => 'professor','action' => 'add'))?>" >
					<div class="icon addUser"></div>
					Pridať
				</a>
			</td>
			<td>			
				<a href="<?= $this->url(array('controller' => 'professor','action' => 'addcsv'))?>" >
					<div class="icon csvImport"></div>
					CSV Import
				</a>
			</td>
			<td>				
				<a href="#" class="deleteProfessor">
					<div class="icon delete"></div>
					Odstrániť
				</a>
			</td>
		</tr>
		</table>
	</div>
	<div class="clear"></div>	
</div>
<div class="message"></div>
<form>
<table>
<tr>
	<th></th>	
	<th>Meno</th>	
	<th>Akcia</th>
</tr>
	<?php foreach($this->professors as $professor):	?>
	<tr id="<?php echo $professor->getPid(); ?>">
		<td class="center">
			<input type="checkbox" name="<?php echo $professor->getPid(); ?>" value="<?php echo $professor->getPid(); ?>">
		</td>
		<td class="left">
			<?php 
			echo $professor->getTitle_before() . ' ' .  
				 $professor->getFirstname() . ' ' .
				 $professor->getLastname() . ' ' .
				 $professor->getTitle_behind(); 
			?>
		</td>		
		<td class="center"><a class="actionIcon editAction" href="
			<?php echo $this->url(array(
				'controller' => 'professor',
				'action' => 'edit',
				'pid' => $professor->getPid()))
			?>">Upraviť</a>
		</td>
	</tr>
<?php endforeach;?>	
</table>
</form>